<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户登录</title>
<link href="css/login.css" rel="stylesheet" type="text/css" />
</head>
<script language="javascript">
	function init() {
		document.getElementById("us").value = "";
		document.getElementById("ps").value = "";
	}
	
	function login() {
		var loginName = document.getElementById("us").value;
		var passwd = document.getElementById("ps").value;
		if(loginName == ''){
			document.getElementById("us").focus();
			alert("请输入用户名");
			return;
		}
		if(passwd == ''){
			document.getElementById("ps").focus();
			alert("请输入密码");
			return;
		}
		document.getElementById("loginName").value = loginName;
		document.getElementById("passwd").value = passwd;
		document.loginForm.submit();
	}
	
	function pressEnter(from) {
		var e = event.keyCode; 
		if (e==13) { 
			if(from == '1') {
				document.getElementById("ps").focus();
				return;
			}
			login();
		}
	}
</script>
<body>
<form name="loginForm" action="login.ac" method="post">
	<input id="loginName" type="hidden" name="loginName">
	<input id="passwd" type="hidden" name="passwd">
</form>
    <div id="login">
	
	     <div id="top">
		      <div id="top_left"><img src="images/login/login_03.gif" /></div>
			  <div id="top_center"></div>
		 </div>
		 
		 <div id="center">
		      <div id="center_left"></div>
			  <div id="center_middle">
			       <div id="user">用 户
			         <input id="us" type="text" onkeyup="pressEnter('1')"/>
			       </div>
				   <div id="password">密   码
				     <input id="ps" type="password" onkeyup="pressEnter()"/>
				   </div>
				   <div id="btn"><a href="javascript:login()">登录</a><a href="javascript:init()">清空</a></div>
			  
			  </div>
			  <div id="center_right"></div>		 
		 </div>
		 <div id="down">
		      <div id="down_left">
			      <div id="inf">
                       <span class="inf_text">版本信息</span>
					   <span class="copyright">气度网后台信息管理系统 2011 v2.0</span>
			      </div>
			  </div>
			  <div id="down_center"></div>		 
		 </div>

	</div>
</body>
</html>
